/*
package com.example.demo.controller;


import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.demo.config.MyController;
import com.example.demo.domain.Person;
import com.example.demo.listener.ExcelStudentDataListener;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.Dad;
import com.example.demo.service.PersonService;
import com.example.demo.service.SysLogService;
import com.example.demo.service.UserService;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;


*/
/**
 * @author 张文迪
 * @date 2021/6/1 10:01
 *//*

@Api(tags = "用户接口")
@MyController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @Autowired
    private SysLogService logService;

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private PersonService personService;

    @Qualifier("test11")
    @Autowired
    private Dad dad;



//
//    @Resource(name = "test22")
//    private Dad dad;

    private final static Logger log = LoggerFactory.getLogger(UserController.class);




    @Log("查找所有用户")
    @ApiOperation(value = "查询单个用户")
    @GetMapping("/listUser")
    @ResponseBody
    public PageInfo<User> listUser(){
        User bean = new User();
        bean.setId(7);
        bean.setScore(100);
        bean.setName("李四");

        LambdaUpdateWrapper<User> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
        lambdaUpdateWrapper.set(User::getName,"李").eq(User::getId,1);
        userService.update(lambdaUpdateWrapper);

        userService.list();




        userService.updateById(bean);

//        LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery();

        LambdaQueryWrapper<User> queryWrapper = new LambdaQueryWrapper<>();
//        queryWrapper.setEntity(bean);
        queryWrapper
                .gt(User::getScore,80)
                .eq(User::getName,"李")
                .le(User::getScore,90)
                .like(User::getName,"李");
        List<User> userList1 = userService.list(queryWrapper);

        LambdaQueryWrapper<User> queryWrapper1 = new LambdaQueryWrapper<>();
        queryWrapper1.like(User::getName,"李");
        List<User> userList = userService.list(queryWrapper1);

        //测试lambda表达式
        userList.forEach(o -> System.out.println(o));

        userService.updateById(bean);
//        List<User> users = userService.list(queryWrapper);
        PageHelper.startPage(2,2);
        List<User> users = userService.list();


        PageInfo<User> userPageInfo = new PageInfo<User>();
        userPageInfo.setList(users);
        return userPageInfo;

    }


    @Log("测试aoplog")
    @ApiOperation(value = "测试你个头")
    @RequestMapping("/aop")
    @ResponseBody
    public Object aop(String name, String nick) {
        Map<String, Object> map =new HashMap<>();
        log.info("controller方法aop被执行了！");
        map.put("res", "ok");

        EasyExcel.read("F:\\210615_183106.xlsx", Person.class,new ExcelStudentDataListener()).sheet().doRead();

        Person bean = new Person();
        bean.setAge(18);
        bean.setName("李逵");
        bean.setSex("男");
        bean.setCardid(UUID.randomUUID().toString().substring(0,5));
        personService.save(bean);

        return map;
    }



}
*/
